package org.notepad.persistence;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class TimeRecordOpenHelper extends SQLiteOpenHelper {
	
	public TimeRecordOpenHelper(Context context){
		super(context, null, null, 0);
	}
	@Override
	public void onCreate(SQLiteDatabase db) {
		String sql = "create table timeRecords"+
							"(id integer primary key ,time text,notes text)";
		db.execSQL(sql);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		String sql = "drop table if exists timeRecords";
		db.execSQL(sql);
		onCreate(db);
	}

}
